<?php

namespace app\common\helper;

class Cros
{
    public function handle($request, \Closure $next)
    {
        $header["Access-Control-Allow-Origin"] = "*";
        $header["Access-Control-Allow-Methods"] = "*";
        $header["Access-Control-Allow-Headers"] = "*";
        $header["Access-Control-Allow-Credentials"] = "true";
        return $next($request)->header($header);
    }
}